// config/index.js
const config = {
  envs: {
    // API 地址
    SQ_API_URL: process.env.SQ_API_URL || "http://localhost:3001/api",

    // 种子分类
    SQ_TORRENT_CATEGORIES: {
      MOVIE: {
        name: "电影",
        subcategories: {
          ALL: "全部",
          CHINESE: "华语",
          EUROPEAN: "欧美",
          JAPANESE: "日本",
          KOREAN: "韩国",
          ANIMATION: "动画",
          DOCUMENTARY: "纪录片",
          OTHER: "其他",
        },
      },
      TV: {
        name: "剧集",
        subcategories: {
          ALL: "全部",
          CHINESE: "华语",
          EUROPEAN: "欧美",
          JAPANESE: "日本",
          KOREAN: "韩国",
          ANIMATION: "动画",
          DOCUMENTARY: "纪录片",
          OTHER: "其他",
        },
      },
      ANIME: {
        name: "动漫",
        subcategories: {
          ALL: "全部",
          CHINESE: "华语",
          JAPANESE: "日本",
          KOREAN: "韩国",
          OTHER: "其他",
        },
      },
      MUSIC: {
        name: "音乐",
        subcategories: {
          ALL: "全部",
          CHINESE: "华语",
          EUROPEAN: "欧美",
          JAPANESE: "日本",
          KOREAN: "韩国",
          CLASSICAL: "古典",
          OTHER: "其他",
        },
      },
      GAME: {
        name: "游戏",
        subcategories: {
          ALL: "全部",
          PC: "PC",
          PS4: "PS4",
          PS5: "PS5",
          XBOX: "Xbox",
          SWITCH: "Switch",
          OTHER: "其他",
        },
      },
      SOFTWARE: {
        name: "软件",
        subcategories: {
          ALL: "全部",
          WINDOWS: "Windows",
          MAC: "Mac",
          LINUX: "Linux",
          ANDROID: "Android",
          IOS: "iOS",
          OTHER: "其他",
        },
      },
      EBOOK: {
        name: "电子书",
        subcategories: {
          ALL: "全部",
          CHINESE: "中文",
          ENGLISH: "英文",
          JAPANESE: "日文",
          OTHER: "其他",
        },
      },
      OTHER: {
        name: "其他",
        subcategories: {
          ALL: "全部",
          OTHER: "其他",
        },
      },
    },

    // 推荐系统配置
    SQ_RECOMMENDATION: {
      // 推荐数量
      DEFAULT_COUNT: 6,
      // 相似资源推荐数量
      SIMILAR_COUNT: 6,
      // 推荐服务地址
      SERVICE_URL:
        process.env.SQ_RECOMMENDATION_URL || "http://localhost:8080/api/v1",
      // 推荐服务超时时间（毫秒）
      TIMEOUT: parseInt(process.env.SQ_RECOMMENDATION_TIMEOUT || "5000", 10),
    },
  },

  secrets: {
    // 敏感配置，只在服务器端可用
    SENTRY_DSN: process.env.SENTRY_DSN,
    SENTRY_AUTH_TOKEN: process.env.SENTRY_AUTH_TOKEN,
  },
};

module.exports = config;
